package com.cmcc.cmii.common.result;

/**
 * @author Thanks
 */
public class ResultVoUtils {

    public static ResultVo success(Object obj){
        ResultVo resultVo = new ResultVo();
        resultVo.setData(obj);
        return resultVo;
    }

    public static ResultVo error(Integer code,String message){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(code);
        resultVo.setMessage(message);
        resultVo.setSuccess(Boolean.FALSE);
        return resultVo;
    }

    public static ResultVo success(Integer code,String message){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(code);
        resultVo.setMessage(message);
        resultVo.setSuccess(Boolean.TRUE);
        return resultVo;
    }
}
